//
//  PKEditorController.h
//  PKVideoOveray
//
//  Created by Snow Joker on 2023/4/10.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <CoreFoundation/CoreFoundation.h>
NS_ASSUME_NONNULL_BEGIN

@interface PKEditorController : NSObject

@property(nonatomic,strong)NSArray *clips;
@property(nonatomic,strong)NSArray *clipsTimeRanges;

@property(nonatomic,strong,readonly)AVMutableComposition *composition;
@property(nonatomic,strong,readonly)AVMutableVideoComposition *videoComposition;

@property(nonatomic,strong,readonly)AVMutableAudioMix *audioMax;

@property(nonatomic,strong,readonly)NSString *outputPath;

-(void)buildCompositionObjectsForPlayback:(BOOL)forPlayback;

-(AVAssetExportSession *)assetExportSessionWithPreset:(NSString *)presetName;

///裁剪视频
-(AVMutableVideoComposition *)cropVideoByVideoTrack:(AVURLAsset *)asset withTimeStart:(float)start withTimeDuration:(float)duration withCropFrame:(CGSize)cropSize withXY:(CGPoint)point;


-(AVPlayerItem *)playerItem;


@end

NS_ASSUME_NONNULL_END
